Ext.define('DragonApp.view.pack.Grid', {
    extend: 'Ext.grid.Panel',
    alias: ['widget.packgrid'],

    requires: [
        'DragonApp.store.JsonPPack',
        'DragonApp.view.pack.FilterBar',
        'DragonApp.view.pack.ItemBar'
    ],

    controller: 'pack',

    dockedItems: [{
        xtype: 'pack-filter',
        itemId: 'pack-filter',
        dock: 'top'
    }, {
        xtype: 'pack-filter-items',
        itemId: 'filter-items',
        dock: 'top'
    }],
    columns: {
        defaults: {
            width: 120,
            align: 'center'
        },
        items: [
            { text: '序列号', xtype: 'rownumberer', width: 80 },
            { text: '道具名称', dataIndex: 'cid' },
            { text: '类型', dataIndex: 'type' },
            { text: '品质', dataIndex: 'quality' },
            { text: '拥有数量', dataIndex: 'num' },
            { text: '属性', dataIndex: 'attribute', align: 'left', flex: 2, renderer: 'attrRender' },
            { text: '特殊属性', dataIndex: 'special_attri', align: 'left', flex: 1, renderer: 'attrRender' }
        ]
    },
    store: {
        type: 'jsonPPackStore',
        storeId : 'jsonPPackStore'
    }
});